﻿//
//摘要：
//     文件实体信息， 用于文件上传对文件信息的封装
//
using System;
using System.Collections.Specialized;

namespace CM.Resources.SDK
{
    public class FileData
    {
        private string _inputName = "File";
        /// <summary>
        /// 站点名
        /// </summary>
        public string SiteName { get; set; }
        /// <summary>
        /// 原文件名
        /// </summary>
        public string OrgFileName { get; set; }
        /// <summary>
        /// 客户端IP
        /// </summary>
        public string ClientIP { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTime { get; set; }
        /// <summary>
        /// 备注信息
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 文件数据
        /// </summary>
        public byte[] Data { get; set; }
        /// <summary>
        /// 控件名
        /// </summary>
        public string InputName
        {
            get
            {
                return this._inputName;
            }
        }
        /// <summary>
        /// 封装提交参数
        /// </summary>
        public NameValueCollection Params
        {
            get{
                NameValueCollection nc = new NameValueCollection();
                nc.Add("SiteName", this.SiteName);
                nc.Add("OrgFileName", this.OrgFileName);
                nc.Add("ClientIP", this.ClientIP);
                nc.Add("CreateTime", this.CreateTime);
                nc.Add("Remark", this.Remark);
                return nc;
            }
        }
    }
}